﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MyMaster.master" AutoEventWireup="true" CodeFile="LaptopNhaSX.aspx.cs" Inherits="LaptopNhaSX" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div style="margin:10px 25px 0px 25px;">
        <asp:Label ID="lblTenHang" runat="server" Font-Size="14" Font-Bold="true" Text="Laptop "/>
        <asp:SqlDataSource ID="sql_sanpham" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                            SelectCommand="SELECT * FROM sanpham WHERE id_nhasx = @id_row">
            <SelectParameters>
                <asp:QueryStringParameter Name="id_row" QueryStringField="id_row" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:DataList ID="datalistSanPham" runat="server" DataKeyField="id_row" 
            DataSourceID="sql_sanpham" RepeatColumns="4">
            <ItemTemplate>
                <table  width="180px" style="text-align:center;">
                    <tr>
                        <td style="vertical-align:middle; height:200px; width:200px;">
                            <asp:Image ID="imgHinhAnh" runat="server" Height="200px" Width="200px" 
                                ImageUrl='<%# "~/images/SanPham/" + Eval("id_row") + "/hinhchude.jpg" %>' />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:HyperLink ID="hyp_tensp" runat="server" ForeColor="DarkBlue" Font-Bold="true" Text='<%# Eval("tensp") %>'
                                        NavigateUrl='<%# "~/LaptopChiTiet.aspx?id_row=" + Eval("id_row")%>' />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblGiaBan" runat="server" Text='<%# "Giá bán: <b>" + Eval("dongia","{0:###,###}") + " VNĐ</b>" %>' />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblTinhTrang" runat="server" Font-Size="10" Font-Italic="true" Text='<%# Eval("tinhtrang") %>' />
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
        </asp:DataList>
    </div>    
</asp:Content>

